UPDATE
cscart_june_setuplock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1D+jKslpbWhYLlLuRKW/+hGg9I7Ap5xGmnoeLelphiE='
WHERE
key_id = '98267d37d63840fa2249c8d9f19470a4dabe45a5806a810408ccce82e511b1b6'
AND (
token = '1D+jKslpbWhYLlLuRKW/+hGg9I7Ap5xGmnoeLelphiE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)