UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qw/yS0J7EX5ethzl/EfqFCZGgDUEAMsiNnNSM1gGGL0=' 
WHERE 
  key_id = '9397d46e4100c0ff525cfe78448d5035bd4ef0ed0aecaaa675a6b750333e2e73' 
  AND (
    token = 'qw/yS0J7EX5ethzl/EfqFCZGgDUEAMsiNnNSM1gGGL0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035