UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FdXjcjl/Jdr/2ngVaUkYL1eZvT5BoSRPr0I8XIE7/nw=' 
WHERE 
  key_id = 'bd649b3cbe640fb98ac242ee830233506dfb3c63e67009b2dca2cce67a15c4ff' 
  AND (
    token = 'FdXjcjl/Jdr/2ngVaUkYL1eZvT5BoSRPr0I8XIE7/nw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028