UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Ro3iywXArDRGTZdjpCjlgTnJBJgR3QVahzNkcpGVzFg=' 
WHERE 
  key_id = 'ebdd68049897c7b313dd6f1225a0f4c6f11075e7de0443c65f501c8a48ad2e6f' 
  AND (
    token = 'Ro3iywXArDRGTZdjpCjlgTnJBJgR3QVahzNkcpGVzFg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00068