UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ovmuXCvzjjFtyP5hx4VkU7Pb8DHnaOURHOKOT7SB4tY='
WHERE
key_id = '36258e97266c2643cd73843b14843bb5ea424c8ada9aa93afc55126ca31b95b8'
AND (
token = 'ovmuXCvzjjFtyP5hx4VkU7Pb8DHnaOURHOKOT7SB4tY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)