UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WbfEp6A1/8/DR2rV+Db9jFzSmeAFONOwuH6RVSkNurU='
WHERE
key_id = 'cfbe1d5d9d7af1de0424a087fe0bcd6ce5eba5502dbd92f54b1d0e68cde82c34'
AND (
token = 'WbfEp6A1/8/DR2rV+Db9jFzSmeAFONOwuH6RVSkNurU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)