UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'i3V/X4GTjP/ohRqllpl1h1rjvWeqPWB3k7w7/Ic2ILs='
WHERE
key_id = '9beaf95ffb6a706c6ca5cf0510a87d1d2d3fd8c89fa63386833ac6e3c9a2ac19'
AND (
token = 'i3V/X4GTjP/ohRqllpl1h1rjvWeqPWB3k7w7/Ic2ILs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)