UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rSxJu2wtQZgyZwplR9KvwLqKQfwfYN2/82FIj34uHyw=' 
WHERE 
  key_id = '26e8f2ece2bdf4a88dee9ceb850ecf834dd821aaee319c5d0ce5e306daf19c97' 
  AND (
    token = 'rSxJu2wtQZgyZwplR9KvwLqKQfwfYN2/82FIj34uHyw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029