UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '91rdj4Sedeg9PzDKGTDwuzxhC6OPZJ3YsGdHf9dTlNU=' 
WHERE 
  key_id = 'aebe1969b3cbb7d69c1d7533556e3c2a2adb2ccbf8f5c719d8241a0a5af8d90a' 
  AND (
    token = '91rdj4Sedeg9PzDKGTDwuzxhC6OPZJ3YsGdHf9dTlNU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037