UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '35JBXizrSf4kc/pJxgXFjohHkiLuQoeNB8XOWaAe6E4='
WHERE
key_id = '10a01a38e548b4ebbcd6bec6c3b68c6f0fb9ac0d71f9e555f840dd4b3bf61d05'
AND (
token = '35JBXizrSf4kc/pJxgXFjohHkiLuQoeNB8XOWaAe6E4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)