UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '608iyC59/6KeLZj0Ow4cRWTgsy/hN7r9rf26LWmauCk='
WHERE
key_id = '98303853b8571d265a5be93f8d150ffccbbabc8e3024fbc556d68a84766a5d30'
AND (
token = '608iyC59/6KeLZj0Ow4cRWTgsy/hN7r9rf26LWmauCk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)