UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yxDdOdRMV5qEQbjyhky5s5YfWh/xL+fQpHPKzZwgVW0='
WHERE
key_id = '3897d999e7bc5d08c13455278cfe599c7513b5c979a7d74f7ab637be30570fd4'
AND (
token = 'yxDdOdRMV5qEQbjyhky5s5YfWh/xL+fQpHPKzZwgVW0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)