UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eeo9caEPKSSydGGGwbfgoR6WLHuTQgL6W8a5Blz4suQ='
WHERE
key_id = 'b3f6c37c4325eb32a0c30ae75a1f8c3bbb812ba39a50ee2e8188b01404d2468f'
AND (
token = 'eeo9caEPKSSydGGGwbfgoR6WLHuTQgL6W8a5Blz4suQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)