UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jSreJHBgowCxuSBFFiShrpYlkcw74M8oHLErFFoY7+A='
WHERE
key_id = '93fa1484f262e312471b7e4b52c77bb8ae94043c2a1b17150462c2f9d47079fe'
AND (
token = 'jSreJHBgowCxuSBFFiShrpYlkcw74M8oHLErFFoY7+A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)