UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H6durII4vP3TMTsclBo9zY7NKly9HlweV/2HgN5k6+g='
WHERE
key_id = 'eb2233edf2d5932b6b40bf879aaff3ed44f1acf92722410fefcba2bfb61cb22e'
AND (
token = 'H6durII4vP3TMTsclBo9zY7NKly9HlweV/2HgN5k6+g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)