UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4FQa0aFLCJ+DBu7xgeq16U+gnXrFIhWctXy1JhxnD8A=' 
WHERE 
  key_id = '764449301fa2f799dd82338e809da6a6cd4c6c3863084d0578ff3605c64b62ba' 
  AND (
    token = '4FQa0aFLCJ+DBu7xgeq16U+gnXrFIhWctXy1JhxnD8A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025