UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+f6lsy6CaR8x8Ko2ac5Bl3YxP6xultr/+Mttklh4NOs='
WHERE
key_id = 'e6fbff5d5fc258fa3d248afcef330797dff8afe2e8549f09081d746094fef22a'
AND (
token = '+f6lsy6CaR8x8Ko2ac5Bl3YxP6xultr/+Mttklh4NOs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)