UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/d38K2wZvqOyYQj0evxPLVuYeZ04G7eq7KnQHOD+ZLI=' 
WHERE 
  key_id = '67ff5b6c3e4f62d14226b4b2c14bd0b0e2f270995a8902e46eb553661e1625f0' 
  AND (
    token = '/d38K2wZvqOyYQj0evxPLVuYeZ04G7eq7KnQHOD+ZLI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040