UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'l6MliCBDauQN41SVQ43GY1lTxSRxCBI/VmN18jOtuOI=' 
WHERE 
  key_id = 'f63b775a75e1fce92b03f4509556c67c0f68b6feda99e9da96caafd874fb1621' 
  AND (
    token = 'l6MliCBDauQN41SVQ43GY1lTxSRxCBI/VmN18jOtuOI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030