UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QuhdtsTTU7x59LVnkblkesYYaRF3Z5Cf0Eto1pT43Ws='
WHERE
key_id = '0553d49bf2ec270d51f8c33f85cd3295d47efcf4e2b6f679dedd6b508e94164b'
AND (
token = 'QuhdtsTTU7x59LVnkblkesYYaRF3Z5Cf0Eto1pT43Ws='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)