UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EtIxK/zq3Rj+V7RGey4ceQ4ldu2OfvoFz3MtvfgyCAo='
WHERE
key_id = '69eb18ba2e56f1b11609c555c18199568fd7482b787f59492bac6ccdf36eb4b7'
AND (
token = 'EtIxK/zq3Rj+V7RGey4ceQ4ldu2OfvoFz3MtvfgyCAo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)