UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vnHy8o3vAU52eAxBb1mMoH1Bjy8dS/Vkmru/FxJJjto=' 
WHERE 
  key_id = '59beaefd6303246dff9bc85002f4f1ae984f81b5609a265a9fd1dd5e442059bc' 
  AND (
    token = 'vnHy8o3vAU52eAxBb1mMoH1Bjy8dS/Vkmru/FxJJjto=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045