UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DWtgowjo9OP1hx/kZEqLQfLQS0K+MMx308rAxEgi094='
WHERE
key_id = '44035e8949aaac3e7ac686a1a9382037c3e4c3d0a95a7487e86fcca5b18c6952'
AND (
token = 'DWtgowjo9OP1hx/kZEqLQfLQS0K+MMx308rAxEgi094='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)