UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7n8nCwf4vdPMDN1o2cgkefioc2XZQqUhOw/FnGg7QDg=' 
WHERE 
  key_id = '2b91b92b335517806cbb5190ee7cbf154dc5bc5d66e25523a0a2a580f1db138e' 
  AND (
    token = '7n8nCwf4vdPMDN1o2cgkefioc2XZQqUhOw/FnGg7QDg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028