UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MPFaubrZV26p6iJU4MXhs6Crr34OkJLGJP4ECHFNYRE='
WHERE
key_id = '467f953de8dda0905325ffe573fbd56fa53674de983cbf2d080144c66525ee3b'
AND (
token = 'MPFaubrZV26p6iJU4MXhs6Crr34OkJLGJP4ECHFNYRE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)