UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RSBsRmh0DkKHGgY+uDJOsOR8OJqFfKP3k3V55r32710=' 
WHERE 
  key_id = '5f26a0c5710997364c1b6c0dbf30a14467bab44aea5372fb4226e2a1bb8e93eb' 
  AND (
    token = 'RSBsRmh0DkKHGgY+uDJOsOR8OJqFfKP3k3V55r32710=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00053