UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GLLlv67o3gnC1eNEYL/zrh6jx3tLY6Eez7/ZrSwMmms='
WHERE
key_id = '3cb2bd5d812625e386d315dab23a505659974c33437ee700cb0e9f5755100c27'
AND (
token = 'GLLlv67o3gnC1eNEYL/zrh6jx3tLY6Eez7/ZrSwMmms='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)