UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qBco/OYs5pba8fPrVgK/7kyfmB0/Vp44/9uLetgVT+0=' 
WHERE 
  key_id = '7fd7502765e5555b2181aba043658da3f8e8c2a3ccabb18488cc670e18e3c289' 
  AND (
    token = 'qBco/OYs5pba8fPrVgK/7kyfmB0/Vp44/9uLetgVT+0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021