UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EAAN5QPZkvAXj4ynggU9r5pfKrcU9OfQaw4GcHMQSSg=' 
WHERE 
  key_id = '3acb110414cf3ca99bbdd288ec79d9ec4dd7e220d515f2ba8eaebce57e03b88d' 
  AND (
    token = 'EAAN5QPZkvAXj4ynggU9r5pfKrcU9OfQaw4GcHMQSSg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039