UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RHHEp95biqE/pesHtqynvCJEoLgAhH2g8Vw8kKmiELc='
WHERE
key_id = '2670d1c79cf1e53211a6cd2c9b0387939707f8d7b8bc7ea8e099333eebc229c8'
AND (
token = 'RHHEp95biqE/pesHtqynvCJEoLgAhH2g8Vw8kKmiELc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)