UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rZpqlb/H9QEYjZjQXiVW2ZJUUObnJrYIXAWRGTjfrVI=' 
WHERE 
  key_id = '9d37b4b7d31db3cb234122af7743f512d44bc1fcc403eb24457b7ee87555beae' 
  AND (
    token = 'rZpqlb/H9QEYjZjQXiVW2ZJUUObnJrYIXAWRGTjfrVI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021