UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '60UBVogRJB2qyNzac6XYUa8seC04tmxJ/Mfomb21Jv4='
WHERE
key_id = 'f88c05e511c19c5a3fca72124f71f2265b96ab202e0ad8074bbe729c6dd233c7'
AND (
token = '60UBVogRJB2qyNzac6XYUa8seC04tmxJ/Mfomb21Jv4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)