UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y+TqzTdRzdrKwWHCzjWLPCASkCQmZxbJcTzQoO1uCog='
WHERE
key_id = '9260b6225a268bc14c1f6aa728b96894aa52b7cf9874d9cec701fd2d2f7727cc'
AND (
token = 'y+TqzTdRzdrKwWHCzjWLPCASkCQmZxbJcTzQoO1uCog='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)