UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Oa1IJ3OjUwYqu8eJpbEFGAHSPxUaylWXpc/GDfITl40=' 
WHERE 
  key_id = '5b7a0680e4508825e9fb26f28507235aedbb86e23536a0f15b8ef607fcce902c' 
  AND (
    token = 'Oa1IJ3OjUwYqu8eJpbEFGAHSPxUaylWXpc/GDfITl40=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044