UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tjMr+pxo7VpuLEbRfvpaUkthODhKn4LnL9a9bPAVbFM='
WHERE
key_id = '71f0af84b57d50a9171203e6f4a76c74d3bd57893e9e95c06316e4fbedf7c7cb'
AND (
token = 'tjMr+pxo7VpuLEbRfvpaUkthODhKn4LnL9a9bPAVbFM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)