UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5N5sNiBJB4sWJYIfv7CriPn2gr/czXUKg9KKx3brimU=' 
WHERE 
  key_id = '08cd0927d4651fba84275f1ed85b83e2c88323d0ea9f55f93518cd26bd7fd4c6' 
  AND (
    token = '5N5sNiBJB4sWJYIfv7CriPn2gr/czXUKg9KKx3brimU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027