UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/SDdQT0DQsMgbbbkPBnICnb1IT7/HO/tb3Tr4VsFs5E='
WHERE
key_id = 'a9f41263f678e81cb78f2a925c6d1a8351e151605b5d5e22adf6ac5e991aaae7'
AND (
token = '/SDdQT0DQsMgbbbkPBnICnb1IT7/HO/tb3Tr4VsFs5E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)