UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mqAES4Ci494/WJlOg5th4LpgU7aqG1+YVDD7YtbbuAk='
WHERE
key_id = '921d21ac6db1fce32bd68af5ce02937ed805d225f970c761fa45d9809f08475c'
AND (
token = 'mqAES4Ci494/WJlOg5th4LpgU7aqG1+YVDD7YtbbuAk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)