UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm9S9m/tl91+LI5UdAGEPbjQ5rxLKr4PZ3qFnyexScBA='
WHERE
key_id = '70cd59b088450503fc97808d0342d0cac3acbc60c31cbfb78c0c05b0b21c0d11'
AND (
token = 'm9S9m/tl91+LI5UdAGEPbjQ5rxLKr4PZ3qFnyexScBA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)