UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'C2GPuG2Q0XEjQJKRDnIOmKLJZdBQVgY4fsqn/Y1vCjM='
WHERE
key_id = '0b55f50a9340baf3dda321b2b3f10151f2c9088cd1b4c55206b46ad1d2dd63f9'
AND (
token = 'C2GPuG2Q0XEjQJKRDnIOmKLJZdBQVgY4fsqn/Y1vCjM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)